﻿package  {
	import flash.geom.Point;
	import flash.display.MovieClip;
	

	
	public class Bullet extends Unit {
		

		var range:Number;
		public function Bullet(map:Map,canvas:MovieClip,location:Point) {
			super(map,canvas,location);
			range=150;
			speed=10;
		}
		public override function move(){
			super.move();
			range-=speed;
			if(range<=0) deconstruct();
		}
		public function deconstruct(){
			parent.removeChild(this);
		}
	}
	
}
